package com.gears_software.sxdc.dccx.data.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.gears_software.sxdc.dccx.ui.view.ChengKeInformationListItemView;
import com.gears_software.sxdc.dccx.ui.view.ChengKeInformationListItemView_;


/**
 * Created by SunMuran on 2017/8/1.
 * 车主已完成的adapter
 */

public class ChengKeListAdapter extends BaseAdapter {
    Context context;

    public ChengKeListAdapter(Context context) {
        this.context = context;
    }

    @Override
    public int getCount() {
        return 4;
    }

    @Override
    public Object getItem(int position) {
        return getItem(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        ChengKeInformationListItemView itemView  = null;

        if (convertView == null) {
            itemView = ChengKeInformationListItemView_.build(context);
        } else {
            itemView = (ChengKeInformationListItemView) convertView;
        }

        itemView.bind();

        return itemView;
    }
}
